@isTest
private class OpportunityTaskEvent_Test {

    static testMethod void OpportunityTaskEvent() {
        RecordType rec1=[Select Id From RecordType where SobjectType='Account' and IsActive=true and  Name='AAS Master Client'] ;
RecordType rec2=[Select Id From RecordType where SobjectType='Account' and IsActive=true and  Name='AAS Sales Account'] ;
Account acc1 = new Account();

    acc1.RecordTypeId =rec1.Id;
    acc1.Name = 'MasteraccountTest';
    insert acc1;
Account acc2 = new Account();
    acc2.RecordTypeId =rec2.Id;
    acc2.Master_Client__c=acc1.Id;
    acc2.Name = 'accountTest';
    insert acc2;
    Opportunity opp = new Opportunity();
    opp.RecordTypeId = RecordTypeHelper.GetRecordTypeId('Opportunity', 'Advanced Ad Solutions');
    opp.AccountId = acc2.Id;
    opp.Name = 'AAS opp test';
    opp.StageName = 'Closed Won';
    opp.CloseDate = Date.today().addDays(1);
    opp.Credit_Check_Info_Secured__c='Yes';
    opp.Contract_Start_Date__c=date.today();
    opp.Contract_Termination_Date__c=date.today();
    opp.Amount=1000;
    opp.LeadSource='Cold Call';
    insert opp;
    Quote quot= new Quote();
    quot.OpportunityId=opp.Id;
    quot.status='RFP Draft';
    //quot.Account=acc2.ID;
    quot.Name='Quote test';
    insert quot;
    Order__c fulfillmentorder= new Order__c();
    fulfillmentorder.Opportunity__c=opp.Id;
    fulfillmentorder.Credit_Check_Info_Secured__c=opp.Credit_Check_Info_Secured__c;
    fulfillmentorder.Campaign_End_Date__c=Date.Today();
    fulfillmentorder.Renewal_Date__c=Date.Today();
    insert fulfillmentorder;
    Task tsk2=new Task();   
    tsk2.WhatId=opp.Id;
    tsk2.Status='In Progress';
    tsk2.ActivityDate=date.today();
    tsk2.Subject='Email';  
    insert tsk2;
    Event OEvent = new Event(Subject = 'Test',StartDateTime = Datetime.now(),EndDateTime = Datetime.now(),WhatId=opp.Id);
    insert OEvent;
    ApexPages.StandardController controller=new ApexPages.StandardController(opp);
    OpportunityTaskEventController opptskevnt=new OpportunityTaskEventController(controller);
    opptskevnt.getParam('0');
    opptskevnt.del();
    opptskevnt.edit();
    }
}